#!/usr/bin/python
from hashdb_output import log, VERBOSE, QUIET, DEBUG, DEFAULT
import hashdb_config_base
import hashdb_config_defaults
import hashdb_config_cmdline
import hashdb_config_file
import hashdb_config_updatedb

def parse_config(settings=None, cmdline=True):
    if settings == None:
        settings = hashdb_config_base.ConfigSettings()

    if cmdline:
        hashdb_config_cmdline.parse_config_commandline(settings=settings, override=False)

    hashdb_config_file.parse_config_files(settings=settings, override=False)
    hashdb_config_updatedb.parse_config_updatedb(settings=settings, override=False)

    return settings

if __name__ == '__main__':
    print parse_config()
